package com.example.service;

import com.example.mapper.PoetryLocateMapper;
import com.example.pojo.Area_code;
import com.example.pojo.Poetry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PoetryServiceImpl implements PoetryService {
    @Autowired
    private PoetryLocateMapper poetrylocateMapper;

    @Override
    public List<Poetry> locate_and_poetry(int location_id){
        return poetrylocateMapper.locate_and_poetry(location_id);
    }
    @Override
    public List<Poetry> locate_all_poetry(int location_id){
        return poetrylocateMapper.locate_all_poetry(location_id);
    }
    @Override
    public Poetry poetry_all(int id){
        return poetrylocateMapper.poetry_all(id);
    }
//    @Override
//    public void create_view(int location_id){
//        poetrylocateMapper.create_view(location_id);
//    }
//    @Override
//    public List<Poetry> select_view(int location_id){
//        return poetrylocateMapper.select_view(location_id);
//    }
//    @Override
//    public void drop_view(){
//        poetrylocateMapper.drop_view();
//    }
//    @Override
//    public void drop_index(){
//        poetrylocateMapper.drop_index();
//    }
    @Override
    public void alter_code(){
        poetrylocateMapper.alter_code();
    }
    @Override
    public void create_index(){
        poetrylocateMapper.create_index();
    }

    @Override
    public String detail_url(int id) {
        return poetrylocateMapper.detail_url(id);
    }
    @Override
    public int count_poetry(){
        return poetrylocateMapper.count_poetry();
    }
    @Override
    public List<Area_code> search_area_name(String key){
        return poetrylocateMapper.search_area_name(key);
    }
    @Override
    public List<Poetry> search_poetry_name(String key){
        return poetrylocateMapper.search_poetry_name(key);
    }
    @Override
    public List<String> province_below(int location_id){
        return poetrylocateMapper.province_below(location_id);
    }
    @Override
    public List<String> select_area(){
        return poetrylocateMapper.select_area();
    }
    @Override
    public void add_column_num(){
        poetrylocateMapper.add_column_num();
    }
    @Override
    public void add_num(String code,int poetry_num){
        poetrylocateMapper.add_num(code,poetry_num);
    }
    @Override
    public int get_locate_poetry(String code){
        return poetrylocateMapper.get_locate_poetry(code);
    }
    @Override
    public String check_column(){
        return poetrylocateMapper.check_column();
    }
    @Override
    public     void delete_area(){
        poetrylocateMapper.delete_area();
    }
}
